// 续费预警
import request from "@/utils/request";
import request2 from "@/utils/request-notice";

// 获取续费预警列表
export function getAlertListAPI(data) {
  return request({
    url: "/renewalAlerts/alertsList",
    method: "get",
    params: data,
  });
}

// 预警设置-保存
export function saveSettingsAPI(data) {
  return request({
    url: "/renewalAlerts/alertSettings",
    method: "post",
    data: data,
  });
}

// 预警设置-读取
export function getSettingsAPI(data) {
  return request({
    url: "/renewalAlerts/settingsList",
    method: "post",
    data: data,
  });
}

// 导出
export function exportListAPI(data) {
  return request({
    method: "post",
    url: "/renewalAlerts/alertExport",
    responseType: "blob",
    headers: { "Content-Type": "application/json; application/octet-stream" },
    data: data,
  });
}

// 发送续费提醒
export function setMessageAPI(data) {
  return request({
    url: "/interactMessage/renewalReminders",
    method: "post",
    data: data,
  });
}

export function toNoticeAPI(data) {
  return request2({
    url: "/wxmp/notice/arrearsMessage",
    method: "post",
    data: data,
  });
}
